package com.ruoyi.redtea.dualprevent.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 风险点控制措施的具体内容，排查项
 * @TableName train_risk_point_control_ways_avatar
 */
@TableName(value ="train_risk_point_control_ways_avatar")
@Data
public class TrainRiskPointControlWaysAvatar implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 关联的措施id
     */
    private Integer waysId;

    /**
     * 排查内容
     */
    private String contentCheck;

    /**
     * 排查依据
     */
    private String checkBasis;

    /**
     * 隐患等级（一般隐患，重大隐患）
     */
    private Integer troubleLevel;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 
     */
    @TableLogic
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainRiskPointControlWaysAvatar other = (TrainRiskPointControlWaysAvatar) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWaysId() == null ? other.getWaysId() == null : this.getWaysId().equals(other.getWaysId()))
            && (this.getContentCheck() == null ? other.getContentCheck() == null : this.getContentCheck().equals(other.getContentCheck()))
            && (this.getCheckBasis() == null ? other.getCheckBasis() == null : this.getCheckBasis().equals(other.getCheckBasis()))
            && (this.getTroubleLevel() == null ? other.getTroubleLevel() == null : this.getTroubleLevel().equals(other.getTroubleLevel()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWaysId() == null) ? 0 : getWaysId().hashCode());
        result = prime * result + ((getContentCheck() == null) ? 0 : getContentCheck().hashCode());
        result = prime * result + ((getCheckBasis() == null) ? 0 : getCheckBasis().hashCode());
        result = prime * result + ((getTroubleLevel() == null) ? 0 : getTroubleLevel().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", waysId=").append(waysId);
        sb.append(", contentCheck=").append(contentCheck);
        sb.append(", checkBasis=").append(checkBasis);
        sb.append(", troubleLevel=").append(troubleLevel);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}